﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace ExtensionsTest
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class Window1 : Window
    {
                #region Images

        /// <summary>
        /// Images Dependency Property
        /// </summary>
        public static readonly DependencyProperty ImagesProperty =
            DependencyProperty.Register("Images", typeof(List<string>), typeof(Window1),
                new FrameworkPropertyMetadata((List<string>)null));

        public List<string> Images
        {
            get { return (List<string>)GetValue(ImagesProperty); }
            set { SetValue(ImagesProperty, value); }
        }

        #endregion

        ObservableCollection<string> source1 = new ObservableCollection<string>();

        public Window1()
        {
            InitializeComponent();


            this.Loaded += new RoutedEventHandler(FluidWrapPanelDemo_Loaded);
        }

        void FluidWrapPanelDemo_Loaded(object sender, RoutedEventArgs e)
        {
            source1.Add("/Resources/Images/Icons/Applications.png");
            source1.Add("/Resources/Images/Icons/browser.png");
            source1.Add("/Resources/Images/Icons/cal.png");
            source1.Add("/Resources/Images/Icons/calc.png");
            source1.Add("/Resources/Images/Icons/clock.png");
            //ImageIcon imgIcon;
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/Applications.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/browser.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/cal.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/calc.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/clock.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/Downloads.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/Facebook.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/graph.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/ipod.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/mail.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/map.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/notes.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/phone.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/photo.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/Skype.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/SMS.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/Terminal.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/tools.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/twitter.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/wallpaper.png" };
            //source1.Add(imgIcon);
            //imgIcon = new ImageIcon() { Width = 65, Height = 65, ImagePath = "/Resources/Images/Icons/weather.png" };
            //source1.Add(imgIcon);

            fluidWrapPanel.ItemsSource = source1;
        }
    }
}
